#include <semaphore.h>
sem_t mic_floor;

void mic_init ()
{
   if ( sem_init ( &mic_floor, 0, 1) == -1 )
   {
      printf ( "semaphore init" );
   }
}

void mic_request (void *ptr)
{
   sem_wait ( &mic_floor );
}

void mic_relinquish (void *ptr)
{
   sem_post ( &mic_floor );
}

